`ifndef GOGOGO_CASE_SV
`define GOGOGO_CASE_SV

class gogogo_case_seq extends my_sequence;

	extern function new(string name = "gogogo_case_seq");
	extern virtual task body();

	
	`uvm_object_utils(gogogo_case_seq)
endclass: gogogo_case_seq

function gogogo_case_seq::new(string name = "gogogo_case_seq");
	super.new(name);
endfunction: new

task gogogo_case_seq::body();
    integer file;
    file = $fopen("../script/gogogo.cfg","r");
    while(!$feof(file))begin
        bit[32-1:0] value;
        $fscanf(file, "%b\n", value);
        `uvm_do_with(my_tr, {my_tr.gogogo == local::value;})
    end
    //file = $fopen("../script/gogogo.cfg","r");
    //while(!$feof(file))begin
    //    bit[32-1:0] value;
    //    $fscanf(file, "%b\n", value);
    //    `uvm_do_with(my_tr, {my_tr.gogogo == local::value;})
    //end

	#100;
endtask: body

class gogogo_case extends base_test;

	extern function new(string name = "base_test", uvm_component parent=null);
	extern virtual function void build_phase(uvm_phase phase);
	
	`uvm_component_utils(gogogo_case)
endclass: gogogo_case

function gogogo_case::new(string name = "base_test", uvm_component parent=null);
    super.new(name, parent);
endfunction: new

function void gogogo_case::build_phase(uvm_phase phase);
	super.build_phase(phase);
	uvm_config_db #(uvm_object_wrapper)::set(
		this,
		"env.i_agt0.sqr.main_phase",
		"default_sequence",
		gogogo_case_seq::type_id::get()
	);
    uvm_config_db #(uvm_object_wrapper)::set(
		this,
		"env.i_agt1.sqr.main_phase",
		"default_sequence",
		gogogo_case_seq::type_id::get()
	);

endfunction: build_phase

`endif
